/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pacificlms.MainPanel;

import javax.swing.Icon;
import javax.swing.ImageIcon;
import pacificlms.LoggedMember;

/**
 * This panel contains the functions that librarians can invoke
 * @author brianhhh
 */
public class ControlPanelLibrarian extends javax.swing.JPanel {

    /** 
     * Creates new form NonMemberControlPanel 
     */
    public ControlPanelLibrarian() {
        initComponents();
        
        try
        {
            java.net.URL IconURL1 = getClass().getResource("/icons/search.png");
            Icon icn1 =  new ImageIcon(IconURL1);
            btnSearchResource.setIcon(icn1);    

            java.net.URL IconURL2 = getClass().getResource("/icons/search.png");
            Icon icn2 =  new ImageIcon(IconURL2);
            btnSearchCopy.setIcon(icn2); 

            java.net.URL IconURL3 = getClass().getResource("/icons/search.png");
            Icon icn3 =  new ImageIcon(IconURL3);
            btnSearchMember.setIcon(icn3); 

            java.net.URL IconURL4 = getClass().getResource("/icons/search.png");
            Icon icn4 =  new ImageIcon(IconURL4);
            btnSearchReserve.setIcon(icn4); 

            java.net.URL IconURL5 = getClass().getResource("/icons/checkout.png");
            Icon icn5 =  new ImageIcon(IconURL5);
            btnActionCheckOut.setIcon(icn5); 

            java.net.URL IconURL6 = getClass().getResource("/icons/checkout.png");
            Icon icn6 =  new ImageIcon(IconURL6);
            btnActionCheckOut.setIcon(icn6); 

            java.net.URL IconURL7 = getClass().getResource("/icons/checkin.png");
            Icon icn7 =  new ImageIcon(IconURL7);
            btnActionCheckIn.setIcon(icn7); 

            java.net.URL IconURL8 = getClass().getResource("/icons/hold.png");
            Icon icn8 =  new ImageIcon(IconURL8);
            btnActionHold.setIcon(icn8); 

            java.net.URL IconURL9 = getClass().getResource("/icons/renew.png");
            Icon icn9 =  new ImageIcon(IconURL9);
            btnActionRenew.setIcon(icn9); 

            java.net.URL IconURL10 = getClass().getResource("/icons/reserve.png");
            Icon icn10 =  new ImageIcon(IconURL10);
            btnActionSetReserve.setIcon(icn10); 

            java.net.URL IconURL11 = getClass().getResource("/icons/viewinfo.png");
            Icon icn11 =  new ImageIcon(IconURL11);
            btnMyMemberInfo.setIcon(icn11); 
        }
        catch(Exception Ex)
        {
            System.err.println("Unable to load images");
        }
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        btnSearchResource = new javax.swing.JButton();
        btnActionCheckOut = new javax.swing.JButton();
        btnActionRenew = new javax.swing.JButton();
        btnActionHold = new javax.swing.JButton();
        btnSearchCopy = new javax.swing.JButton();
        btnSearchMember = new javax.swing.JButton();
        btnActionCheckIn = new javax.swing.JButton();
        btnActionSetReserve = new javax.swing.JButton();
        btnSearchReserve = new javax.swing.JButton();
        jSeparator2 = new javax.swing.JSeparator();
        btnMyMemberInfo = new javax.swing.JButton();
        jSeparator3 = new javax.swing.JSeparator();

        setMaximumSize(new java.awt.Dimension(146, 537));
        setMinimumSize(new java.awt.Dimension(146, 537));
        setPreferredSize(new java.awt.Dimension(146, 537));
        setLayout(null);

        btnSearchResource.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        btnSearchResource.setText("Resource Search");
        btnSearchResource.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSearchResourceActionPerformed(evt);
            }
        });
        add(btnSearchResource);
        btnSearchResource.setBounds(0, 0, 146, 21);

        btnActionCheckOut.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        btnActionCheckOut.setLabel("Check Out");
        btnActionCheckOut.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnActionCheckOutActionPerformed(evt);
            }
        });
        add(btnActionCheckOut);
        btnActionCheckOut.setBounds(0, 124, 146, 21);

        btnActionRenew.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        btnActionRenew.setText("Renew");
        btnActionRenew.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnActionRenewActionPerformed(evt);
            }
        });
        add(btnActionRenew);
        btnActionRenew.setBounds(0, 211, 146, 21);

        btnActionHold.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        btnActionHold.setText("Hold");
        btnActionHold.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnActionHoldActionPerformed(evt);
            }
        });
        add(btnActionHold);
        btnActionHold.setBounds(0, 182, 146, 21);

        btnSearchCopy.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        btnSearchCopy.setText("Copy Search");
        btnSearchCopy.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSearchCopyActionPerformed(evt);
            }
        });
        add(btnSearchCopy);
        btnSearchCopy.setBounds(0, 29, 146, 21);

        btnSearchMember.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        btnSearchMember.setText("Member Search");
        btnSearchMember.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSearchMemberActionPerformed(evt);
            }
        });
        add(btnSearchMember);
        btnSearchMember.setBounds(0, 58, 146, 21);

        btnActionCheckIn.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        btnActionCheckIn.setText("Check In");
        btnActionCheckIn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnActionCheckInActionPerformed(evt);
            }
        });
        add(btnActionCheckIn);
        btnActionCheckIn.setBounds(0, 153, 146, 21);

        btnActionSetReserve.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        btnActionSetReserve.setText("Set Reserve");
        btnActionSetReserve.setMaximumSize(new java.awt.Dimension(146, 23));
        btnActionSetReserve.setMinimumSize(new java.awt.Dimension(146, 23));
        btnActionSetReserve.setPreferredSize(new java.awt.Dimension(146, 23));
        btnActionSetReserve.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnActionSetReserveActionPerformed(evt);
            }
        });
        add(btnActionSetReserve);
        btnActionSetReserve.setBounds(0, 240, 146, 23);

        btnSearchReserve.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        btnSearchReserve.setText("Reserve Search");
        btnSearchReserve.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSearchReserveActionPerformed(evt);
            }
        });
        add(btnSearchReserve);
        btnSearchReserve.setBounds(0, 87, 146, 21);

        jSeparator2.setMinimumSize(new java.awt.Dimension(146, 146));
        add(jSeparator2);
        jSeparator2.setBounds(0, 116, 146, 2);

        btnMyMemberInfo.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        btnMyMemberInfo.setText("View my info");
        btnMyMemberInfo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMyMemberInfoActionPerformed(evt);
            }
        });
        add(btnMyMemberInfo);
        btnMyMemberInfo.setBounds(0, 277, 146, 21);
        add(jSeparator3);
        jSeparator3.setBounds(0, 269, 146, 2);
    }// </editor-fold>//GEN-END:initComponents

    /** Search for Resource */
    private void btnSearchResourceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSearchResourceActionPerformed
        MainPanel.GetMainPanel().AddCentralUIPanel(new SearchForResource(false));
    }//GEN-LAST:event_btnSearchResourceActionPerformed
    
    /** Search for copy */
    private void btnSearchCopyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSearchCopyActionPerformed
        MainPanel.GetMainPanel().AddCentralUIPanel(new SearchForCopy(false));
    }//GEN-LAST:event_btnSearchCopyActionPerformed
    
    /** Search for Member */
    private void btnSearchMemberActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSearchMemberActionPerformed
        MainPanel.GetMainPanel().AddCentralUIPanel(new SearchForMember(false));
    }//GEN-LAST:event_btnSearchMemberActionPerformed

    /** Search for Reserve */
    private void btnSearchReserveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSearchReserveActionPerformed
        MainPanel.GetMainPanel().AddCentralUIPanel(new SearchForReserve(false));
    }//GEN-LAST:event_btnSearchReserveActionPerformed

    /** Create a Check Out */
    private void btnActionCheckOutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnActionCheckOutActionPerformed
        MainPanel.GetMainPanel().AddCentralUIPanel(new ActionCheckOutCopyofResource());
    }//GEN-LAST:event_btnActionCheckOutActionPerformed
    
    /** Check In a copy */
    private void btnActionCheckInActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnActionCheckInActionPerformed
        MainPanel.GetMainPanel().AddCentralUIPanel(new ActionCheckInCopyofResource());
    }//GEN-LAST:event_btnActionCheckInActionPerformed

    /** Hold a resource */
    private void btnActionHoldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnActionHoldActionPerformed
        MainPanel.GetMainPanel().AddCentralUIPanel(new ActionHoldResource());
    }//GEN-LAST:event_btnActionHoldActionPerformed

    /** Renew a check out */
    private void btnActionRenewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnActionRenewActionPerformed
        MainPanel.GetMainPanel().AddCentralUIPanel(new ActionRenewCopyofResource());
    }//GEN-LAST:event_btnActionRenewActionPerformed

    /** Create a Course Reserve */
    private void btnActionSetReserveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnActionSetReserveActionPerformed
        MainPanel.GetMainPanel().AddCentralUIPanel(new InformationReserve(null));
    }//GEN-LAST:event_btnActionSetReserveActionPerformed

    /** View my Member Info */
    private void btnMyMemberInfoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMyMemberInfoActionPerformed
        MainPanel.GetMainPanel().AddCentralUIPanel(new InformationMember(LoggedMember.getInstance()));
    }//GEN-LAST:event_btnMyMemberInfoActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnActionCheckIn;
    private javax.swing.JButton btnActionCheckOut;
    private javax.swing.JButton btnActionHold;
    private javax.swing.JButton btnActionRenew;
    private javax.swing.JButton btnActionSetReserve;
    private javax.swing.JButton btnMyMemberInfo;
    private javax.swing.JButton btnSearchCopy;
    private javax.swing.JButton btnSearchMember;
    private javax.swing.JButton btnSearchReserve;
    private javax.swing.JButton btnSearchResource;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator3;
    // End of variables declaration//GEN-END:variables
}
